home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
HYP
/
C-D
/
DeveloperStax.cpt
/
Developer Stack 1.0
/
card_9127.txt
< prev
next >
Wrap
Text File
|
1989-02-26
|
8KB
|
263 lines
-- card: 9127 from stack: in.0
-- bmap block id: 0
-- flags: 0000
-- background id: 13187
-- name: Scrolling Text Button 2
----- HyperTalk script -----
on closecard
put empty into card field result
end closecard
-- part 1 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=68 top=308 right=325 bottom=212
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Result
-- part 4 (field)
-- low flags: 00
-- high flags: 4007
-- rect: left=57 top=70 right=299 bottom=491
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
----- HyperTalk script -----
COMMAND CLICK on any word in this script for an example of how this script works.
-- The BMUG/UNSOM trick by Guy Kuo and Raines Cohen - December 14,1987
-- Use this script freely but please retain the above credit
--
-- The BMUG trick by Raines Cohen
-- fused with the
-- UNSOM technique by Guy Kuo
--
-- Recombinant code? Script splicing? Naw, just HyperCard letting
-- ideas grow together. Here is how this one works.
--
-- If the commandKey is down, we're in danger of doing a text button
-- Check if the msg box has already been moved off the screen.
-- If it hasnt hide the msg box by moving it off the screen and
-- remember the old msg box location in MsgLoc
-- the msg visibility in msgVis, and the msg in msgContent
-- This allows us to restore things back to the way they were when
-- we are done.
-- If the msg box has been moved off the screen and msg is not
-- empty, the user has command selected something and it is in msg
-- do something with msg. In this example we put it into another
-- field. After something useful is done. We must empty msg to
-- reset ourselves for the next go around.
--
-- If the commandKey is up, we're safe. Check if the msg box
-- has been moved off the screen. If it has, restore it to its
-- original state.
--
-- Note that this technique interferes with command-M if the mouse
-- is within the field
On MouseWithin
global msgLoc,msgVis,msgContent
if the commandKey is down then
if the loc of msg <> "10,-100" then
put the loc of msg into msgLoc
put the visible of msg into msgVis
put msg into msgContent
set the loc of msg to 10,-100
put empty into msg
else
if msg <> empty then
put msg into card field result
put empty into msg
end if
end if
else
if the loc of msg is "10,-100" then
put msgContent into msg
set visible of msg to msgVis
set the loc of msg to msgLoc
end if
end if
End MouseWithin
On Idle -- Don't forget this idle handler! It takes care of the case
-- of the user moving off the field while holding down the command
-- key. Without this, the msg box would be "hung up"
global msgLoc,msgVis,msgContent
if (the commandKey is up) and (the loc of msg is "10,-100") then
put msgContent into msg
set visible of msg to msgVis
set the loc of msg to msgLoc
end if
pass Idle
End Idle
-- part contents for background part 4
----- text -----
2
-- part contents for background part 2
----- text -----
Scrolling Text Button 2
-- part contents for background part 3
----- text -----
COMMAND CLICK on any word in this script for an example of how this script works.
-- The BMUG/UNSOM trick by Guy Kuo and Raines Cohen - December 14,1987
-- Use this script freely but please retain the above credit
--
-- The BMUG trick by Raines Cohen
-- fused with the
-- UNSOM technique by Guy Kuo
--
-- Recombinant code? Script splicing? Naw, just HyperCard letting
-- ideas grow together. Here is how this one works.
--
-- If the commandKey is down, we're in danger of doing a text button
-- Check if the msg box has already been moved off the screen.
-- If it hasnt hide the msg box by moving it off the screen and
-- remember the old msg box location in MsgLoc
-- the msg visibility in msgVis, and the msg in msgContent
-- This allows us to restore things back to the way they were when
-- we are done.
-- If the msg box has been moved off the screen and msg is not
-- empty, the user has command selected something and it is in msg
-- do something with msg. In this example we put it into another
-- field. After something useful is done. We must empty msg to
-- reset ourselves for the next go around.
--
-- If the commandKey is up, we're safe. Check if the msg box
-- has been moved off the screen. If it has, restore it to its
-- original state.
--
-- Note that this technique interferes with command-M if the mouse
-- is within the field
On MouseWithin
global msgLoc,msgVis,msgContent
if the commandKey is down then
if the loc of msg <> "10,-100" then
put the loc of msg into msgLoc
put the visible of msg into msgVis
put msg into msgContent
set the loc of msg to 10,-100
put empty into msg
else
if msg <> empty then
--
--msg now contains the selected word
--it's up to you to do something with it
--
put empty into msg
end if
end if
else
if the loc of msg is "10,-100" then
put msgContent into msg
set visible of msg to msgVis
set the loc of msg to msgLoc
end if
end if
End MouseWithin
On Idle -- Don't forget this idle handler! It takes care of the case
-- of the user moving off the field while holding down the command
-- key. Without this, the msg box would be "hung up"
global msgLoc,msgVis,msgContent
if (the commandKey is up) and (the loc of msg is "10,-100") then
put msgContent into msg
set visible of msg to msgVis
set the loc of msg to msgLoc
end if
pass Idle
End Idle
-- part contents for card part 4
----- text -----
COMMAND CLICK on any word in this script for an example of how this script works.
-- The BMUG/UNSOM trick by Guy Kuo and Raines Cohen - December 14,1987
-- Use this script freely but please retain the above credit
--
-- The BMUG trick by Raines Cohen
-- fused with the
-- UNSOM technique by Guy Kuo
--
-- Recombinant code? Script splicing? Naw, just HyperCard letting
-- ideas grow together. Here is how this one works.
--
-- If the commandKey is down, we're in danger of doing a text button
-- Check if the msg box has already been moved off the screen.
-- If it hasnt hide the msg box by moving it off the screen and
-- remember the old msg box location in MsgLoc
-- the msg visibility in msgVis, and the msg in msgContent
-- This allows us to restore things back to the way they were when
-- we are done.
-- If the msg box has been moved off the screen and msg is not
-- empty, the user has command selected something and it is in msg
-- do something with msg. In this example we put it into another
-- field. After something useful is done. We must empty msg to
-- reset ourselves for the next go around.
--
-- If the commandKey is up, we're safe. Check if the msg box
-- has been moved off the screen. If it has, restore it to its
-- original state.
--
-- Note that this technique interferes with command-M if the mouse
-- is within the field
On MouseWithin
global msgLoc,msgVis,msgContent
if the commandKey is down then
if the loc of msg <> "10,-100" then
put the loc of msg into msgLoc
put the visible of msg into msgVis
put msg into msgContent
set the loc of msg to 10,-100
put empty into msg
else
if msg <> empty then
--
--msg now contains the selected word
--it's up to you to do something with it
--
put empty into msg
end if
end if
else
if the loc of msg is "10,-100" then
put msgContent into msg
set visible of msg to msgVis
set the loc of msg to msgLoc
end if
end if
End MouseWithin
On Idle -- Don't forget this idle handler! It takes care of the case
-- of the user moving off the field while holding down the command
-- key. Without this, the msg box would be "hung up"
global msgLoc,msgVis,msgContent
if (the commandKey is up) and (the loc of msg is "10,-100") then
put msgContent into msg
set visible of msg to msgVis
set the loc of msg to msgLoc
end if
pass Idle
End Idle